<template>
    <div class="goods">
      <GoodsListItem v-for="goodsItem in goods" :goodsItem="goodsItem"></GoodsListItem>
    </div>
</template>

<script>

// 引入子组件
import GoodsListItem from "./GoodsListItem";

export default {
  name: "GoodsList",
  props: {
    goods: {
      type: Array,
      default() {
        return []
      }
    }
  },
  components: {
    GoodsListItem
  },
}
</script>

<style scoped>
.goods {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  padding: 2px;
}

</style>